layui.extend({
    admin:'lay/modules/admin'
}).define(['jquery','admin','conf'],function(exports){
    var $ = layui.jquery,
        admin = layui.admin;
    //解决 IE8 不支持console
    window.console = window.console || (function () {
        var c = {};
        c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile = c.clear = c.exception = c.trace = c.assert = function () {
            // code...
        };
        return c;
    })();

    // Tips
    $('*[lay-tips]').on('mouseenter', function(){
        var obj = $(this),
            width = obj.width(),
            content = $(this).attr('lay-tips');
        if(width < 80){
            this.index = layer.tips('<div style="color: #eee;">' + content + '</div>', this, {
                time: -1,
                maxWidth: 280,
                tips: [2, '#3A3D49'],
                success: function(layero, index) {
                    obj.on("mouseleave",function(){
                        layer.close(index);
                    })
                }
            });
        }
    });
    //初始化页面
    //layui.admin.initPage();
    exports('index',{});
});